ASSIGNMENT 4¶

Note: This is a worksheet of my Assignment 3. So, I have done Assignment 4 also in this worksheet, below the Assignment 3. I have mentioned "Assignment 4 starts here" from where it is starting, so it's good if we directly jump to that section¶

In [1]:
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:90% !important; }</style>")) 
# Change the width and rerun to see what happens, e.g. 50 and 80
import warnings
warnings.filterwarnings('ignore')
/var/folders/f_/l8yh2fjx4d1c87r9b5pmbcgh0000gn/T/ipykernel_57938/2804307701.py:1: DeprecationWarning: Importing display from IPython.core.display is deprecated since IPython 7.14, please import from IPython display
  from IPython.core.display import display, HTML
In [2]:
import pandas as pd
# note that we will open the csv file of this dataset
data = pd.read_csv('./dataset_landslide.csv')
pd.set_option('display.max_columns', None)
data.head()
Out[2]:
Sample label Area (Region) UTM east [m] UTM north [m] UTM Zone Latitude Longitude Vol [m**3] Volume LCL [%] Volume UCL [%] Area [m**2] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Aspect Slope [deg] (mean) Slope [deg] (pre) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) Surf descr (Constructed surface) Position (Source or Debris area)
0 L1 Western Zagros (Lorestan) 312185.45 3709557.18 39R 33.509090 48.977950 60482600 10 20 1343530 1994.58 1523.04 0.078189 NE 18 14 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 Earth slide Beneath surface Source area
1 L2 Western Zagros (Lorestan) 190623.40 3679054.67 38S 33.206178 47.681184 17348800 5 10 680573 1130.53 1364.11 -0.056317 E 20 27 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 Earth slide Beneath surface Source area
2 L3 Western Zagros (Lorestan) 201216.10 3677046.62 39R 33.191071 47.795318 967077 5 10 78350 916.95 726.22 -0.020998 S 10 13 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 Earth slide Beneath surface Debris area
3 L4 Western Zagros (Lorestan) 202383.74 3676563.61 39R 33.187043 47.807983 1120670 5 5 172811 917.87 677.34 0.002125 SW 6 13 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 Earth slide Beneath surface Debris area
4 L5 Western Zagros (Lorestan) 192868.96 3698043.79 38S 33.377814 47.698798 38911200 5 5 991903 1421.61 963.62 -0.127624 NE 17 15 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 Slump Beneath surface Source area
In [3]:
# copy data=
ds=data.copy()
ds
Out[3]:
Sample label Area (Region) UTM east [m] UTM north [m] UTM Zone Latitude Longitude Vol [m**3] Volume LCL [%] Volume UCL [%] Area [m**2] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Aspect Slope [deg] (mean) Slope [deg] (pre) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) Surf descr (Constructed surface) Position (Source or Debris area)
0 L1 Western Zagros (Lorestan) 312185.45 3709557.18 39R 33.509090 48.977950 60482600 10 20 1343530 1994.58 1523.04 0.078189 NE 18 14 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 Earth slide Beneath surface Source area
1 L2 Western Zagros (Lorestan) 190623.40 3679054.67 38S 33.206178 47.681184 17348800 5 10 680573 1130.53 1364.11 -0.056317 E 20 27 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 Earth slide Beneath surface Source area
2 L3 Western Zagros (Lorestan) 201216.10 3677046.62 39R 33.191071 47.795318 967077 5 10 78350 916.95 726.22 -0.020998 S 10 13 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 Earth slide Beneath surface Debris area
3 L4 Western Zagros (Lorestan) 202383.74 3676563.61 39R 33.187043 47.807983 1120670 5 5 172811 917.87 677.34 0.002125 SW 6 13 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 Earth slide Beneath surface Debris area
4 L5 Western Zagros (Lorestan) 192868.96 3698043.79 38S 33.377814 47.698798 38911200 5 5 991903 1421.61 963.62 -0.127624 NE 17 15 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 Slump Beneath surface Source area
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
330 L331 Western Zagros (Lorestan) 304016.81 3678128.22 39S 33.224332 48.896885 536678000 20 30 2665070 1275.40 1739.75 0.036876 SW 22 26 50 0 0 50 215.40 1690.49 41372.82 30640.35 730.85 Slump Beneath surface Source area
331 L332 Western Zagros (Lorestan) 304291.18 3679563.72 39S 33.237321 48.899519 67052000 5 5 1193950 1342.33 1699.60 0.005915 SW 30 24 50 0 0 50 176.96 786.23 42829.74 32095.16 716.12 Slump Beneath surface Source area
332 L333 Western Zagros (Lorestan) 183736.78 3656979.72 38S 33.005415 47.615057 32061100000 5 5 104000000 1164.94 1840.45 0.041431 NE 21 11 80 20 0 0 4253.19 5455.56 21117.85 3268.45 827.83 Rock slide Top surface Source area
333 L334 Western Zagros (Lorestan) 201543.30 3684870.50 38S 33.261623 47.796253 8639060 5 10 335515 795.59 917.25 -0.002524 Slump 19 34 100 0 0 0 2138.81 5208.94 8856.31 125.67 368.91 Slump Beneath surface Source area
334 L335 Western Zagros (Lorestan) 484858.39 3416860.90 39R 30.884936 50.841582 1441240000 5 5 10978400 2697.90 2478.82 -0.025608 SW 19 18 60 40 0 0 1071.51 9310.01 7719.34 8390.22 3662.37 Rock slide Top surface Source area

335 rows × 29 columns

In [4]:
import numpy as np
ds['log_Vol [m**3]']=np.log(ds['Vol [m**3]'])
ds['log_Area [m**2]']=np.log(ds['Area [m**2]'])
ds
Out[4]:
Sample label Area (Region) UTM east [m] UTM north [m] UTM Zone Latitude Longitude Vol [m**3] Volume LCL [%] Volume UCL [%] Area [m**2] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Aspect Slope [deg] (mean) Slope [deg] (pre) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) Surf descr (Constructed surface) Position (Source or Debris area) log_Vol [m**3] log_Area [m**2]
0 L1 Western Zagros (Lorestan) 312185.45 3709557.18 39R 33.509090 48.977950 60482600 10 20 1343530 1994.58 1523.04 0.078189 NE 18 14 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 Earth slide Beneath surface Source area 17.917866 14.110811
1 L2 Western Zagros (Lorestan) 190623.40 3679054.67 38S 33.206178 47.681184 17348800 5 10 680573 1130.53 1364.11 -0.056317 E 20 27 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 Earth slide Beneath surface Source area 16.669034 13.430690
2 L3 Western Zagros (Lorestan) 201216.10 3677046.62 39R 33.191071 47.795318 967077 5 10 78350 916.95 726.22 -0.020998 S 10 13 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 Earth slide Beneath surface Debris area 13.782033 11.268941
3 L4 Western Zagros (Lorestan) 202383.74 3676563.61 39R 33.187043 47.807983 1120670 5 5 172811 917.87 677.34 0.002125 SW 6 13 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 Earth slide Beneath surface Debris area 13.929437 12.059954
4 L5 Western Zagros (Lorestan) 192868.96 3698043.79 38S 33.377814 47.698798 38911200 5 5 991903 1421.61 963.62 -0.127624 NE 17 15 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 Slump Beneath surface Source area 17.476793 13.807381
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
330 L331 Western Zagros (Lorestan) 304016.81 3678128.22 39S 33.224332 48.896885 536678000 20 30 2665070 1275.40 1739.75 0.036876 SW 22 26 50 0 0 50 215.40 1690.49 41372.82 30640.35 730.85 Slump Beneath surface Source area 20.100909 14.795741
331 L332 Western Zagros (Lorestan) 304291.18 3679563.72 39S 33.237321 48.899519 67052000 5 5 1193950 1342.33 1699.60 0.005915 SW 30 24 50 0 0 50 176.96 786.23 42829.74 32095.16 716.12 Slump Beneath surface Source area 18.020979 13.992778
332 L333 Western Zagros (Lorestan) 183736.78 3656979.72 38S 33.005415 47.615057 32061100000 5 5 104000000 1164.94 1840.45 0.041431 NE 21 11 80 20 0 0 4253.19 5455.56 21117.85 3268.45 827.83 Rock slide Top surface Source area 24.190909 18.459901
333 L334 Western Zagros (Lorestan) 201543.30 3684870.50 38S 33.261623 47.796253 8639060 5 10 335515 795.59 917.25 -0.002524 Slump 19 34 100 0 0 0 2138.81 5208.94 8856.31 125.67 368.91 Slump Beneath surface Source area 15.971804 12.723422
334 L335 Western Zagros (Lorestan) 484858.39 3416860.90 39R 30.884936 50.841582 1441240000 5 5 10978400 2697.90 2478.82 -0.025608 SW 19 18 60 40 0 0 1071.51 9310.01 7719.34 8390.22 3662.37 Rock slide Top surface Source area 21.088770 16.211440

335 rows × 31 columns

VOLUME VS AREA BEFORE TRANSFORMATION¶

In [5]:
ds.plot.scatter(x = 'Area [m**2]', y = 'Vol [m**3]', s = 100)
Out[5]:
<AxesSubplot:xlabel='Area [m**2]', ylabel='Vol [m**3]'>

VOLUME VS AREA AFTER TRANSFORMATION¶

In [6]:
ds.plot.scatter(x = 'log_Area [m**2]', y = 'log_Vol [m**3]', s = 100)
Out[6]:
<AxesSubplot:xlabel='log_Area [m**2]', ylabel='log_Vol [m**3]'>
In [7]:
ds1 = ds.drop(['UTM east [m]', 'Sample label', 'Aspect', 'UTM north [m]', 'Latitude', 'Longitude', 'Slope [deg] (pre)', 'UTM Zone', 'Surf descr (Constructed surface)', 'Position (Source or Debris area)', 'Area [m**2]', 'Vol [m**3]'], axis=1)
ds1
Out[7]:
Area (Region) Volume LCL [%] Volume UCL [%] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Slope [deg] (mean) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) log_Vol [m**3] log_Area [m**2]
0 Western Zagros (Lorestan) 10 20 1994.58 1523.04 0.078189 18 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 Earth slide 17.917866 14.110811
1 Western Zagros (Lorestan) 5 10 1130.53 1364.11 -0.056317 20 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 Earth slide 16.669034 13.430690
2 Western Zagros (Lorestan) 5 10 916.95 726.22 -0.020998 10 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 Earth slide 13.782033 11.268941
3 Western Zagros (Lorestan) 5 5 917.87 677.34 0.002125 6 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 Earth slide 13.929437 12.059954
4 Western Zagros (Lorestan) 5 5 1421.61 963.62 -0.127624 17 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 Slump 17.476793 13.807381
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
330 Western Zagros (Lorestan) 20 30 1275.40 1739.75 0.036876 22 50 0 0 50 215.40 1690.49 41372.82 30640.35 730.85 Slump 20.100909 14.795741
331 Western Zagros (Lorestan) 5 5 1342.33 1699.60 0.005915 30 50 0 0 50 176.96 786.23 42829.74 32095.16 716.12 Slump 18.020979 13.992778
332 Western Zagros (Lorestan) 5 5 1164.94 1840.45 0.041431 21 80 20 0 0 4253.19 5455.56 21117.85 3268.45 827.83 Rock slide 24.190909 18.459901
333 Western Zagros (Lorestan) 5 10 795.59 917.25 -0.002524 19 100 0 0 0 2138.81 5208.94 8856.31 125.67 368.91 Slump 15.971804 12.723422
334 Western Zagros (Lorestan) 5 5 2697.90 2478.82 -0.025608 19 60 40 0 0 1071.51 9310.01 7719.34 8390.22 3662.37 Rock slide 21.088770 16.211440

335 rows × 19 columns

In [8]:
#Label Encoding Slide Type Column
# Import label encoder
from sklearn import preprocessing
  
# label_encoder object knows how to understand word labels
label_encoder = preprocessing.LabelEncoder()
  
ds1['Slide (Slide type)']= label_encoder.fit_transform(ds1['Slide (Slide type)'])
  
ds1['Slide (Slide type)'].unique()
Out[8]:
array([1, 3, 2, 0])
In [9]:
ds1
Out[9]:
Area (Region) Volume LCL [%] Volume UCL [%] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Slope [deg] (mean) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) log_Vol [m**3] log_Area [m**2]
0 Western Zagros (Lorestan) 10 20 1994.58 1523.04 0.078189 18 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 1 17.917866 14.110811
1 Western Zagros (Lorestan) 5 10 1130.53 1364.11 -0.056317 20 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 1 16.669034 13.430690
2 Western Zagros (Lorestan) 5 10 916.95 726.22 -0.020998 10 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 1 13.782033 11.268941
3 Western Zagros (Lorestan) 5 5 917.87 677.34 0.002125 6 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 1 13.929437 12.059954
4 Western Zagros (Lorestan) 5 5 1421.61 963.62 -0.127624 17 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 3 17.476793 13.807381
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
330 Western Zagros (Lorestan) 20 30 1275.40 1739.75 0.036876 22 50 0 0 50 215.40 1690.49 41372.82 30640.35 730.85 3 20.100909 14.795741
331 Western Zagros (Lorestan) 5 5 1342.33 1699.60 0.005915 30 50 0 0 50 176.96 786.23 42829.74 32095.16 716.12 3 18.020979 13.992778
332 Western Zagros (Lorestan) 5 5 1164.94 1840.45 0.041431 21 80 20 0 0 4253.19 5455.56 21117.85 3268.45 827.83 2 24.190909 18.459901
333 Western Zagros (Lorestan) 5 10 795.59 917.25 -0.002524 19 100 0 0 0 2138.81 5208.94 8856.31 125.67 368.91 3 15.971804 12.723422
334 Western Zagros (Lorestan) 5 5 2697.90 2478.82 -0.025608 19 60 40 0 0 1071.51 9310.01 7719.34 8390.22 3662.37 2 21.088770 16.211440

335 rows × 19 columns

In [10]:
# Applying OneHotEncoder on Area(Region)
from sklearn.preprocessing import OneHotEncoder

enc = OneHotEncoder(handle_unknown='ignore', sparse=False)
enc.fit(ds1[['Area (Region)']])
result = enc.transform(ds1[['Area (Region)']])
ohe_columns = ['Area (Region)'+"_"+str(x) for x in enc.categories_[0]]
result_train = pd.DataFrame(result, columns=ohe_columns)
ds2 = pd.concat([ds1, result_train], axis=1)
ds2.head()
Out[10]:
Area (Region) Volume LCL [%] Volume UCL [%] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Slope [deg] (mean) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) log_Vol [m**3] log_Area [m**2] Area (Region)_Eastern Zagros (Fars area) Area (Region)_Western Zagros (Lorestan)
0 Western Zagros (Lorestan) 10 20 1994.58 1523.04 0.078189 18 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 1 17.917866 14.110811 0.0 1.0
1 Western Zagros (Lorestan) 5 10 1130.53 1364.11 -0.056317 20 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 1 16.669034 13.430690 0.0 1.0
2 Western Zagros (Lorestan) 5 10 916.95 726.22 -0.020998 10 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 1 13.782033 11.268941 0.0 1.0
3 Western Zagros (Lorestan) 5 5 917.87 677.34 0.002125 6 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 1 13.929437 12.059954 0.0 1.0
4 Western Zagros (Lorestan) 5 5 1421.61 963.62 -0.127624 17 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 3 17.476793 13.807381 0.0 1.0
In [11]:
ds3 = ds2.drop(['Area (Region)'], axis=1)
ds3.head()
Out[11]:
Volume LCL [%] Volume UCL [%] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Slope [deg] (mean) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) log_Vol [m**3] log_Area [m**2] Area (Region)_Eastern Zagros (Fars area) Area (Region)_Western Zagros (Lorestan)
0 10 20 1994.58 1523.04 0.078189 18 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 1 17.917866 14.110811 0.0 1.0
1 5 10 1130.53 1364.11 -0.056317 20 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 1 16.669034 13.430690 0.0 1.0
2 5 10 916.95 726.22 -0.020998 10 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 1 13.782033 11.268941 0.0 1.0
3 5 5 917.87 677.34 0.002125 6 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 1 13.929437 12.059954 0.0 1.0
4 5 5 1421.61 963.62 -0.127624 17 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 3 17.476793 13.807381 0.0 1.0

APPLYING K-NEIGHBOUR REGRESSOR¶

In [12]:
# K-Neighbour Regressor is Applied
import pandas as pd
import warnings
warnings.filterwarnings("ignore")
ds3
Out[12]:
Volume LCL [%] Volume UCL [%] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Slope [deg] (mean) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) log_Vol [m**3] log_Area [m**2] Area (Region)_Eastern Zagros (Fars area) Area (Region)_Western Zagros (Lorestan)
0 10 20 1994.58 1523.04 0.078189 18 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 1 17.917866 14.110811 0.0 1.0
1 5 10 1130.53 1364.11 -0.056317 20 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 1 16.669034 13.430690 0.0 1.0
2 5 10 916.95 726.22 -0.020998 10 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 1 13.782033 11.268941 0.0 1.0
3 5 5 917.87 677.34 0.002125 6 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 1 13.929437 12.059954 0.0 1.0
4 5 5 1421.61 963.62 -0.127624 17 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 3 17.476793 13.807381 0.0 1.0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
330 20 30 1275.40 1739.75 0.036876 22 50 0 0 50 215.40 1690.49 41372.82 30640.35 730.85 3 20.100909 14.795741 0.0 1.0
331 5 5 1342.33 1699.60 0.005915 30 50 0 0 50 176.96 786.23 42829.74 32095.16 716.12 3 18.020979 13.992778 0.0 1.0
332 5 5 1164.94 1840.45 0.041431 21 80 20 0 0 4253.19 5455.56 21117.85 3268.45 827.83 2 24.190909 18.459901 0.0 1.0
333 5 10 795.59 917.25 -0.002524 19 100 0 0 0 2138.81 5208.94 8856.31 125.67 368.91 3 15.971804 12.723422 0.0 1.0
334 5 5 2697.90 2478.82 -0.025608 19 60 40 0 0 1071.51 9310.01 7719.34 8390.22 3662.37 2 21.088770 16.211440 0.0 1.0

335 rows × 20 columns

In [13]:
# -- depth of landslides, vol/area
ds3['Slide_depth']=ds3['log_Vol [m**3]']/ds3['log_Area [m**2]']


# -- some of distance from both fault columns, river, draingage
ds3['Distance_triggers']=ds3['Distance [m] (from fault)']+ds3['Distance [m] (from B-fault)']+ds3['Distance [m] (from river)']+ds3['Distance [m] (from drainage)']
ds3.head(5)
Out[13]:
Volume LCL [%] Volume UCL [%] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Slope [deg] (mean) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) log_Vol [m**3] log_Area [m**2] Area (Region)_Eastern Zagros (Fars area) Area (Region)_Western Zagros (Lorestan) Slide_depth Distance_triggers
0 10 20 1994.58 1523.04 0.078189 18 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 1 17.917866 14.110811 0.0 1.0 1.269797 138717.04
1 5 10 1130.53 1364.11 -0.056317 20 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 1 16.669034 13.430690 0.0 1.0 1.241115 13343.61
2 5 10 916.95 726.22 -0.020998 10 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 1 13.782033 11.268941 0.0 1.0 1.223010 14354.88
3 5 5 917.87 677.34 0.002125 6 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 1 13.929437 12.059954 0.0 1.0 1.155016 16387.08
4 5 5 1421.61 963.62 -0.127624 17 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 3 17.476793 13.807381 0.0 1.0 1.265757 32464.55
In [14]:
ds4 = ds3.copy()
In [15]:
!pip install --upgrade mlxtend
Requirement already satisfied: mlxtend in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (0.21.0)
Requirement already satisfied: scikit-learn>=1.0.2 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from mlxtend) (1.0.2)
Requirement already satisfied: matplotlib>=3.0.0 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from mlxtend) (3.5.1)
Requirement already satisfied: pandas>=0.24.2 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from mlxtend) (1.4.2)
Requirement already satisfied: setuptools in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from mlxtend) (61.2.0)
Requirement already satisfied: joblib>=0.13.2 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from mlxtend) (1.1.0)
Requirement already satisfied: scipy>=1.2.1 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from mlxtend) (1.7.3)
Requirement already satisfied: numpy>=1.16.2 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from mlxtend) (1.21.5)
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from matplotlib>=3.0.0->mlxtend) (1.3.2)
Requirement already satisfied: packaging>=20.0 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from matplotlib>=3.0.0->mlxtend) (21.3)
Requirement already satisfied: cycler>=0.10 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from matplotlib>=3.0.0->mlxtend) (0.11.0)
Requirement already satisfied: pyparsing>=2.2.1 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from matplotlib>=3.0.0->mlxtend) (3.0.4)
Requirement already satisfied: fonttools>=4.22.0 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from matplotlib>=3.0.0->mlxtend) (4.25.0)
Requirement already satisfied: pillow>=6.2.0 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from matplotlib>=3.0.0->mlxtend) (9.0.1)
Requirement already satisfied: python-dateutil>=2.7 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from matplotlib>=3.0.0->mlxtend) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from pandas>=0.24.2->mlxtend) (2021.3)
Requirement already satisfied: six>=1.5 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib>=3.0.0->mlxtend) (1.16.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /Users/abdulmoiz/opt/anaconda3/lib/python3.9/site-packages (from scikit-learn>=1.0.2->mlxtend) (2.2.0)
In [16]:
import numpy as np
import matplotlib.pyplot as plt

TAKING 'LOG_VOLUME' AS THE TARGET COLUMN¶

In [17]:
%matplotlib inline
from pandas.plotting import scatter_matrix
features1 = ['Slide (Slide type)', 'log_Area [m**2]','Elev mean [m a.s.l.]', 'Relief mean [m]', 'Curvature mean', 'Slope [deg] (mean)', 'Carb [%]', 'Evaporite [%]', 'Clastics [%] (Coarse clastic)', 'Distance [m] (from fold)', 'Distance [m] (from fault)', 'Distance [m] (from B-fault)', 'Distance [m] (from river)', 'Distance [m] (from drainage)', 'Area (Region)_Eastern Zagros (Fars area)', 'Area (Region)_Western Zagros (Lorestan)']
# Now we will define the features X and target column 'y'
X = ds4.loc[:, features1]
# Here we will set the Volume as the Target Column
y = ds4.loc[:, ['log_Vol [m**3]']]
y = ds4["log_Vol [m**3]"].to_numpy()

attributes = ds4.drop(columns='log_Vol [m**3]')
scatter_matrix(attributes, figsize=(30,30), alpha=0.8, marker='O')
Out[17]:
array([[<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Volume LCL [%]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Volume UCL [%]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Elev mean [m a.s.l.]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Relief mean [m]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Curvature mean'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Slope [deg] (mean)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Carb [%]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Clastics [%] (Fine clastic)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Evaporite [%]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Clastics [%] (Coarse clastic)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance [m] (from fold)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance [m] (from fault)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance [m] (from B-fault)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance [m] (from river)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance [m] (from drainage)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Slide (Slide type)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Slide (Slide type)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='log_Area [m**2]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Area (Region)_Eastern Zagros (Fars area)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Area (Region)_Western Zagros (Lorestan)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Slide_depth'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Slide (Slide type)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance_triggers'>]],
      dtype=object)
In [18]:
import seaborn as sns
import matplotlib.pyplot as plt

# -- heat map to see corrolation between features
corrmat = ds4.corr()
top_corr_features = corrmat.index
plt.figure(figsize=(30,30))

# -- plot heat map
sns.heatmap(ds4[top_corr_features].corr(),annot=True,cmap="RdYlGn",) 
Out[18]:
<AxesSubplot:>
In [19]:
X.head()
Out[19]:
Slide (Slide type) log_Area [m**2] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Slope [deg] (mean) Carb [%] Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Area (Region)_Eastern Zagros (Fars area) Area (Region)_Western Zagros (Lorestan)
0 1 14.110811 1994.58 1523.04 0.078189 18 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 0.0 1.0
1 1 13.430690 1130.53 1364.11 -0.056317 20 75 0 25 19.11 5857.57 3480.28 3627.51 378.25 0.0 1.0
2 1 11.268941 916.95 726.22 -0.020998 10 100 0 0 3233.89 2222.71 4390.10 7047.74 694.33 0.0 1.0
3 1 12.059954 917.87 677.34 0.002125 6 100 0 0 3420.80 2383.70 5117.53 8167.99 717.86 0.0 1.0
4 3 13.807381 1421.61 963.62 -0.127624 17 75 0 25 155.50 10508.98 8585.29 13137.74 232.54 0.0 1.0
In [20]:
X.describe()
Out[20]:
Slide (Slide type) log_Area [m**2] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Slope [deg] (mean) Carb [%] Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Area (Region)_Eastern Zagros (Fars area) Area (Region)_Western Zagros (Lorestan)
count 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000 335.000000
mean 1.958209 12.978011 1214.693403 1146.131403 -0.015085 17.092537 54.913433 14.149254 7.402985 3776.133284 4571.655672 25565.667582 28959.632209 1318.570209 0.776119 0.223881
std 1.048830 1.655283 767.544957 430.979698 0.091034 5.188117 41.878156 32.467512 18.039428 5294.559661 4080.701369 33733.300775 33272.603600 1164.421432 0.417467 0.417467
min 0.000000 7.901007 50.750000 344.020000 -0.727094 6.000000 0.000000 0.000000 0.000000 19.110000 13.910000 10.550000 97.670000 2.760000 0.000000 0.000000
25% 1.000000 11.817092 500.390000 789.000000 -0.051088 14.000000 0.000000 0.000000 0.000000 1123.595000 1671.210000 4616.660000 8552.215000 408.055000 1.000000 0.000000
50% 2.000000 12.891064 1077.020000 1075.970000 -0.005379 16.000000 70.000000 0.000000 0.000000 2260.800000 3535.160000 10644.780000 19017.120000 1026.160000 1.000000 0.000000
75% 3.000000 13.982629 1892.435000 1391.510000 0.023755 20.000000 100.000000 0.000000 0.000000 4225.235000 6489.300000 31639.180000 32156.675000 1876.475000 1.000000 0.000000
max 3.000000 18.459901 2870.590000 2498.180000 0.408439 36.000000 100.000000 100.000000 100.000000 41465.230000 23230.860000 175863.600000 180399.200000 6307.640000 1.000000 1.000000
In [21]:
from sklearn.preprocessing import MinMaxScaler
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsRegressor
In [22]:
import numpy as np
import matplotlib.pyplot as plt
In [23]:
X_train_org, X_test_org, y_train, y_test = train_test_split(X, y, random_state = 0, test_size = 0.25)

scaler = MinMaxScaler()
X_train = scaler.fit_transform(X_train_org)
X_test = scaler.transform(X_test_org)
In [24]:
%matplotlib inline
train_score_array = []
test_score_array = []

for k in range(1,10):
    knn_reg = KNeighborsRegressor(k)
    knn_reg.fit(X_train, y_train)
    train_score_array.append(knn_reg.score(X_train, y_train))
    test_score_array.append(knn_reg.score(X_test, y_test))

x_axis = range(1,10)
plt.subplots(figsize = (20,5))
plt.plot(x_axis, train_score_array, c = 'g', label = 'Train Score')
plt.plot(x_axis, test_score_array, c = 'b', label = 'Test Score')
plt.legend()
plt.xlabel('n_neighbors')
plt.ylabel('MSE')
Out[24]:
Text(0, 0.5, 'MSE')
In [25]:
np.where(X.columns == 'Slope [deg] (mean)')
Out[25]:
(array([5]),)
In [26]:
X_b = X_train[:50,6].reshape(-1,1)
y_b = y_train[:50]

knn_reg = KNeighborsRegressor(2)
knn_reg.fit(X_b, y_b)

X_new=np.linspace(X_b.min(), X_b.max(), 50).reshape(50, 1)
y_predict = knn_reg.predict(X_new)

plt.subplots(figsize = (20,5))
plt.plot(X_new, y_predict, c = 'r')
plt.scatter(X_b, y_b)
plt.xlabel('Slope [deg] (mean)')
Out[26]:
Text(0.5, 0, 'Slope [deg] (mean)')
In [27]:
X_new.shape
Out[27]:
(50, 1)
In [28]:
from sklearn.metrics import mean_squared_error

# -- fit algoritem to train data
knn_reg = KNeighborsRegressor(3)
knn_reg.fit(X_train, y_train)

# -- predict target value for test dataset
y_predict_knn = knn_reg.predict(X_test)

# -- comapre target value of the model and abservation for both train and test dataset
print (knn_reg.score(X_train,y_train))
print (knn_reg.score(X_test,y_test))
0.7870141081338686
0.5394404403829148
In [29]:
# -- plot measured target value and modeled target values. This model results has no linear distribution for test data set. compare it with the linear regrassion graph.
plt.scatter(y_test, y_predict_knn)
Out[29]:
<matplotlib.collections.PathCollection at 0x7fc2adde54f0>

Linear Regression using the normal equation¶

In [30]:
import pandas as pd
In [31]:
from sklearn.preprocessing import MinMaxScaler
from sklearn.model_selection import train_test_split

X_train_org, X_test_org, y_train, y_test = train_test_split(X,y, random_state = 0, test_size = 0.25)

scaler = MinMaxScaler()

X_train = scaler.fit_transform(X_train_org)
X_test = scaler.transform(X_test_org)
In [32]:
from sklearn.linear_model import LinearRegression

lreg = LinearRegression()
lreg.fit(X_train, y_train)
print(lreg.score(X_train, y_train))
print(lreg.score(X_test, y_test))
0.9675018806701956
0.9744508809093448

HENCE WE CAN SEE FROM THE ABOVE RESULTS THAT SCORE IMPROVE A LOT FROM -1 IN THE LAST ASSIGNMENT TO 0.97.

R2 Score¶

In [33]:
%matplotlib inline
import matplotlib.pyplot as plt

X_train_rm = X_train[:,5].reshape(-1,1)
lreg.fit(X_train_rm, y_train)
y_predict = lreg.predict(X_train_rm)

plt.subplots(figsize = (20,5))
plt.plot(X_train_rm, y_predict, c = 'r')
plt.scatter(X_train_rm,y_train)
plt.xlabel('RM')
Out[33]:
Text(0.5, 0, 'RM')

SGD Regressor¶

In [34]:
from sklearn.linear_model import SGDRegressor

sgd_reg = SGDRegressor(random_state= 0, max_iter = 100, learning_rate = 'constant', eta0 = 0.05, shuffle = False)
sgd_reg.fit(X_train, y_train)
print(sgd_reg.score(X_train, y_train))
print(sgd_reg.score(X_test, y_test))
0.9660558260087008
0.971940801552713
In [35]:
sgd_reg.coef_
Out[35]:
array([ 9.09191380e-02,  1.50481032e+01, -1.24772832e-01,  6.37526675e-01,
        9.88419012e-02,  1.37237723e-01,  7.45753498e-02,  1.32304778e-01,
        4.59454601e-02,  1.08247850e-02,  1.11334923e-01, -3.90968517e-01,
        1.06272706e-01, -1.28240850e-01,  2.79277157e+00,  2.79191029e+00])
In [36]:
sgd_reg.intercept_
Out[36]:
array([5.76515726])
In [37]:
sgd_reg.n_iter_
Out[37]:
25

ASSIGNMENT 4 STARTS HERE¶

NOTE: THERE ARE TWO QUESTIONS IN THIS ASSIGNMENT. DECISION TREE CLASSIFIER AND LINEAR SVC CLASSIFIER. I AM FIRST DOING THE DECISION TREE CLASSIFIER WHICH IS QUESTION 2 OF THE ASSIGNMENT 4.

QUESTION 2: APPLY DECISION TREE CLASSIFIER, OBTAIN SCORES, SHOW FEATURE IMPORTANCE CHART AND INTERPRET RESULTS.¶

In [38]:
ds4
Out[38]:
Volume LCL [%] Volume UCL [%] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Slope [deg] (mean) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) log_Vol [m**3] log_Area [m**2] Area (Region)_Eastern Zagros (Fars area) Area (Region)_Western Zagros (Lorestan) Slide_depth Distance_triggers
0 10 20 1994.58 1523.04 0.078189 18 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 1 17.917866 14.110811 0.0 1.0 1.269797 138717.04
1 5 10 1130.53 1364.11 -0.056317 20 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 1 16.669034 13.430690 0.0 1.0 1.241115 13343.61
2 5 10 916.95 726.22 -0.020998 10 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 1 13.782033 11.268941 0.0 1.0 1.223010 14354.88
3 5 5 917.87 677.34 0.002125 6 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 1 13.929437 12.059954 0.0 1.0 1.155016 16387.08
4 5 5 1421.61 963.62 -0.127624 17 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 3 17.476793 13.807381 0.0 1.0 1.265757 32464.55
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
330 20 30 1275.40 1739.75 0.036876 22 50 0 0 50 215.40 1690.49 41372.82 30640.35 730.85 3 20.100909 14.795741 0.0 1.0 1.358560 74434.51
331 5 5 1342.33 1699.60 0.005915 30 50 0 0 50 176.96 786.23 42829.74 32095.16 716.12 3 18.020979 13.992778 0.0 1.0 1.287877 76427.25
332 5 5 1164.94 1840.45 0.041431 21 80 20 0 0 4253.19 5455.56 21117.85 3268.45 827.83 2 24.190909 18.459901 0.0 1.0 1.310457 30669.69
333 5 10 795.59 917.25 -0.002524 19 100 0 0 0 2138.81 5208.94 8856.31 125.67 368.91 3 15.971804 12.723422 0.0 1.0 1.255307 14559.83
334 5 5 2697.90 2478.82 -0.025608 19 60 40 0 0 1071.51 9310.01 7719.34 8390.22 3662.37 2 21.088770 16.211440 0.0 1.0 1.300857 29081.94

335 rows × 22 columns

In [39]:
ds5 = ds4.copy()
In [40]:
%matplotlib inline
from pandas.plotting import scatter_matrix
features2 = ['log_Vol [m**3]', 'log_Area [m**2]','Elev mean [m a.s.l.]', 'Relief mean [m]', 'Curvature mean', 'Slope [deg] (mean)', 'Carb [%]', 'Evaporite [%]', 'Clastics [%] (Coarse clastic)', 'Distance [m] (from fold)', 'Distance [m] (from fault)', 'Distance [m] (from B-fault)', 'Distance [m] (from river)', 'Distance [m] (from drainage)', 'Area (Region)_Eastern Zagros (Fars area)', 'Area (Region)_Western Zagros (Lorestan)']
# Now we will define the features X and target column 'y'
X = ds5.loc[:, features2]
# Here we will set the Volume as the Target Column
y = ds5.loc[:, ['Slide (Slide type)']]
y = ds5["Slide (Slide type)"].to_numpy()


attributes = ds5.drop(columns='Slide (Slide type)')
scatter_matrix(attributes, figsize=(30,30), alpha=0.8, marker='O')
Out[40]:
array([[<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Volume LCL [%]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Volume LCL [%]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Volume UCL [%]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Volume UCL [%]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Elev mean [m a.s.l.]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Elev mean [m a.s.l.]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Relief mean [m]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Relief mean [m]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Curvature mean'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Curvature mean'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Slope [deg] (mean)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Slope [deg] (mean)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Carb [%]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Carb [%]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Clastics [%] (Fine clastic)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Clastics [%] (Fine clastic)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Evaporite [%]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Evaporite [%]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Clastics [%] (Coarse clastic)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Clastics [%] (Coarse clastic)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance [m] (from fold)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance [m] (from fold)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance [m] (from fault)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance [m] (from fault)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance [m] (from B-fault)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance [m] (from B-fault)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance [m] (from river)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance [m] (from river)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance [m] (from drainage)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance [m] (from drainage)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='log_Vol [m**3]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='log_Vol [m**3]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='log_Area [m**2]'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='log_Area [m**2]'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Area (Region)_Eastern Zagros (Fars area)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Area (Region)_Eastern Zagros (Fars area)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Area (Region)_Western Zagros (Lorestan)'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Area (Region)_Western Zagros (Lorestan)'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Slide_depth'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Slide_depth'>],
       [<AxesSubplot:xlabel='Volume LCL [%]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Volume UCL [%]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Elev mean [m a.s.l.]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Relief mean [m]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Curvature mean', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Slope [deg] (mean)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Carb [%]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Clastics [%] (Fine clastic)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Evaporite [%]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Clastics [%] (Coarse clastic)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance [m] (from fold)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance [m] (from fault)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance [m] (from B-fault)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance [m] (from river)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance [m] (from drainage)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='log_Vol [m**3]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='log_Area [m**2]', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Area (Region)_Eastern Zagros (Fars area)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Area (Region)_Western Zagros (Lorestan)', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Slide_depth', ylabel='Distance_triggers'>,
        <AxesSubplot:xlabel='Distance_triggers', ylabel='Distance_triggers'>]],
      dtype=object)
In [41]:
import seaborn as sns
import matplotlib.pyplot as plt

# -- heat map to see corrolation between features
corrmat = ds5.corr()
top_corr_features = corrmat.index
plt.figure(figsize=(30,30))

# -- plot heat map
sns.heatmap(ds4[top_corr_features].corr(),annot=True,cmap="RdYlGn",) 
Out[41]:
<AxesSubplot:>
In [42]:
from sklearn.tree import DecisionTreeClassifier

tree = DecisionTreeClassifier(criterion= 'entropy')
tree.fit(X,y)
Out[42]:
DecisionTreeClassifier(criterion='entropy')
In [43]:
import os 
import graphviz

os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'

# Create DOT data
from sklearn.tree import export_graphviz

dot_data = export_graphviz(tree, out_file=None, filled=True, rounded=True, feature_names=X.columns) 

# Draw graph
graph = graphviz.Source(dot_data) 

# Show graph
graph 

#Decision Tree Classification is Applied
Out[43]:
Tree 0 Distance [m] (from drainage) <= 1213.975 entropy = 1.846 samples = 335 value = [35, 86, 72, 142] 1 Elev mean [m a.s.l.] <= 1179.185 entropy = 1.942 samples = 192 value = [30, 66, 42, 54] 0->1 True 122 log_Area [m**2] <= 12.807 entropy = 1.47 samples = 143 value = [5, 20, 30, 88] 0->122 False 2 Distance [m] (from river) <= 10464.33 entropy = 1.77 samples = 116 value = [10, 55, 22, 29] 1->2 75 Distance [m] (from fold) <= 4332.85 entropy = 1.945 samples = 76 value = [20, 11, 20, 25] 1->75 3 log_Vol [m**3] <= 15.039 entropy = 1.498 samples = 50 value = [7, 32, 7, 4] 2->3 28 log_Area [m**2] <= 13.108 entropy = 1.749 samples = 66 value = [3, 23, 15, 25] 2->28 4 Distance [m] (from fault) <= 2776.48 entropy = 0.982 samples = 30 value = [7, 22, 1, 0] 3->4 15 Distance [m] (from fold) <= 1379.145 entropy = 1.485 samples = 20 value = [0, 10, 6, 4] 3->15 5 Slope [deg] (mean) <= 25.5 entropy = 0.371 samples = 14 value = [0, 13, 1, 0] 4->5 8 Distance [m] (from fault) <= 4932.735 entropy = 0.989 samples = 16 value = [7, 9, 0, 0] 4->8 6 entropy = 0.0 samples = 13 value = [0, 13, 0, 0] 5->6 7 entropy = 0.0 samples = 1 value = [0, 0, 1, 0] 5->7 9 Relief mean [m] <= 833.49 entropy = 0.65 samples = 6 value = [5, 1, 0, 0] 8->9 12 Curvature mean <= 0.033 entropy = 0.722 samples = 10 value = [2, 8, 0, 0] 8->12 10 entropy = 0.0 samples = 5 value = [5, 0, 0, 0] 9->10 11 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 9->11 13 entropy = 0.0 samples = 8 value = [0, 8, 0, 0] 12->13 14 entropy = 0.0 samples = 2 value = [2, 0, 0, 0] 12->14 16 entropy = 0.0 samples = 6 value = [0, 6, 0, 0] 15->16 17 Distance [m] (from fold) <= 2203.545 entropy = 1.557 samples = 14 value = [0, 4, 6, 4] 15->17 18 Slope [deg] (mean) <= 14.5 entropy = 1.379 samples = 7 value = [0, 1, 2, 4] 17->18 23 Slope [deg] (mean) <= 19.0 entropy = 0.985 samples = 7 value = [0, 3, 4, 0] 17->23 19 entropy = 0.0 samples = 2 value = [0, 0, 2, 0] 18->19 20 Distance [m] (from drainage) <= 758.465 entropy = 0.722 samples = 5 value = [0, 1, 0, 4] 18->20 21 entropy = 0.0 samples = 4 value = [0, 0, 0, 4] 20->21 22 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 20->22 24 Carb [%] <= 30.0 entropy = 0.811 samples = 4 value = [0, 3, 1, 0] 23->24 27 entropy = 0.0 samples = 3 value = [0, 0, 3, 0] 23->27 25 entropy = 0.0 samples = 1 value = [0, 0, 1, 0] 24->25 26 entropy = 0.0 samples = 3 value = [0, 3, 0, 0] 24->26 29 Slope [deg] (mean) <= 24.5 entropy = 1.608 samples = 54 value = [2, 21, 7, 24] 28->29 66 Curvature mean <= 0.102 entropy = 1.418 samples = 12 value = [1, 2, 8, 1] 28->66 30 Distance [m] (from fault) <= 7286.425 entropy = 1.438 samples = 51 value = [0, 21, 7, 23] 29->30 63 log_Vol [m**3] <= 14.354 entropy = 0.918 samples = 3 value = [2, 0, 0, 1] 29->63 31 Distance [m] (from B-fault) <= 17337.54 entropy = 1.294 samples = 43 value = [0, 21, 3, 19] 30->31 58 Distance [m] (from drainage) <= 467.635 entropy = 1.0 samples = 8 value = [0, 0, 4, 4] 30->58 32 Distance [m] (from B-fault) <= 2317.69 entropy = 0.994 samples = 33 value = [0, 15, 0, 18] 31->32 51 Distance [m] (from fold) <= 1257.67 entropy = 1.295 samples = 10 value = [0, 6, 3, 1] 31->51 33 entropy = 0.0 samples = 4 value = [0, 0, 0, 4] 32->33 34 Relief mean [m] <= 477.77 entropy = 0.999 samples = 29 value = [0, 15, 0, 14] 32->34 35 entropy = 0.0 samples = 3 value = [0, 0, 0, 3] 34->35 36 Relief mean [m] <= 1646.295 entropy = 0.983 samples = 26 value = [0, 15, 0, 11] 34->36 37 Evaporite [%] <= 90.0 entropy = 0.932 samples = 23 value = [0, 15, 0, 8] 36->37 50 entropy = 0.0 samples = 3 value = [0, 0, 0, 3] 36->50 38 Distance [m] (from river) <= 27181.54 entropy = 0.863 samples = 21 value = [0, 15, 0, 6] 37->38 49 entropy = 0.0 samples = 2 value = [0, 0, 0, 2] 37->49 39 Distance [m] (from river) <= 12031.195 entropy = 0.391 samples = 13 value = [0, 12, 0, 1] 38->39 42 Distance [m] (from river) <= 38366.16 entropy = 0.954 samples = 8 value = [0, 3, 0, 5] 38->42 40 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 39->40 41 entropy = 0.0 samples = 12 value = [0, 12, 0, 0] 39->41 43 log_Area [m**2] <= 10.389 entropy = 0.65 samples = 6 value = [0, 1, 0, 5] 42->43 48 entropy = 0.0 samples = 2 value = [0, 2, 0, 0] 42->48 44 Distance [m] (from river) <= 27723.545 entropy = 1.0 samples = 2 value = [0, 1, 0, 1] 43->44 47 entropy = 0.0 samples = 4 value = [0, 0, 0, 4] 43->47 45 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 44->45 46 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 44->46 52 Curvature mean <= -0.051 entropy = 1.371 samples = 5 value = [0, 1, 3, 1] 51->52 57 entropy = 0.0 samples = 5 value = [0, 5, 0, 0] 51->57 53 Distance [m] (from fold) <= 532.85 entropy = 1.0 samples = 2 value = [0, 1, 0, 1] 52->53 56 entropy = 0.0 samples = 3 value = [0, 0, 3, 0] 52->56 54 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 53->54 55 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 53->55 59 entropy = 0.0 samples = 3 value = [0, 0, 0, 3] 58->59 60 log_Vol [m**3] <= 13.642 entropy = 0.722 samples = 5 value = [0, 0, 4, 1] 58->60 61 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 60->61 62 entropy = 0.0 samples = 4 value = [0, 0, 4, 0] 60->62 64 entropy = 0.0 samples = 2 value = [2, 0, 0, 0] 63->64 65 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 63->65 67 Carb [%] <= 72.5 entropy = 0.722 samples = 10 value = [0, 2, 8, 0] 66->67 72 Evaporite [%] <= 10.0 entropy = 1.0 samples = 2 value = [1, 0, 0, 1] 66->72 68 entropy = 0.0 samples = 6 value = [0, 0, 6, 0] 67->68 69 Distance [m] (from B-fault) <= 3269.97 entropy = 1.0 samples = 4 value = [0, 2, 2, 0] 67->69 70 entropy = 0.0 samples = 2 value = [0, 0, 2, 0] 69->70 71 entropy = 0.0 samples = 2 value = [0, 2, 0, 0] 69->71 73 entropy = 0.0 samples = 1 value = [1, 0, 0, 0] 72->73 74 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 72->74 76 log_Vol [m**3] <= 16.268 entropy = 1.799 samples = 45 value = [5, 6, 18, 16] 75->76 105 Elev mean [m a.s.l.] <= 1889.375 entropy = 1.704 samples = 31 value = [15, 5, 2, 9] 75->105 77 Clastics [%] (Coarse clastic) <= 5.0 entropy = 1.577 samples = 14 value = [5, 0, 5, 4] 76->77 88 Elev mean [m a.s.l.] <= 1486.68 entropy = 1.514 samples = 31 value = [0, 6, 13, 12] 76->88 78 Distance [m] (from river) <= 33119.445 entropy = 1.495 samples = 11 value = [2, 0, 5, 4] 77->78 87 entropy = 0.0 samples = 3 value = [3, 0, 0, 0] 77->87 79 Relief mean [m] <= 1445.645 entropy = 1.0 samples = 8 value = [0, 0, 4, 4] 78->79 84 Elev mean [m a.s.l.] <= 2557.58 entropy = 0.918 samples = 3 value = [2, 0, 1, 0] 78->84 80 Distance [m] (from river) <= 4553.17 entropy = 0.722 samples = 5 value = [0, 0, 1, 4] 79->80 83 entropy = 0.0 samples = 3 value = [0, 0, 3, 0] 79->83 81 entropy = 0.0 samples = 1 value = [0, 0, 1, 0] 80->81 82 entropy = 0.0 samples = 4 value = [0, 0, 0, 4] 80->82 85 entropy = 0.0 samples = 2 value = [2, 0, 0, 0] 84->85 86 entropy = 0.0 samples = 1 value = [0, 0, 1, 0] 84->86 89 entropy = 0.0 samples = 5 value = [0, 0, 0, 5] 88->89 90 Distance [m] (from fold) <= 1651.54 entropy = 1.498 samples = 26 value = [0, 6, 13, 7] 88->90 91 Distance [m] (from river) <= 40625.801 entropy = 1.459 samples = 12 value = [0, 6, 4, 2] 90->91 98 log_Area [m**2] <= 14.959 entropy = 0.94 samples = 14 value = [0, 0, 9, 5] 90->98 92 Slope [deg] (mean) <= 17.5 entropy = 0.971 samples = 10 value = [0, 6, 4, 0] 91->92 97 entropy = 0.0 samples = 2 value = [0, 0, 0, 2] 91->97 93 entropy = 0.0 samples = 5 value = [0, 5, 0, 0] 92->93 94 Evaporite [%] <= 15.0 entropy = 0.722 samples = 5 value = [0, 1, 4, 0] 92->94 95 entropy = 0.0 samples = 4 value = [0, 0, 4, 0] 94->95 96 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 94->96 99 log_Vol [m**3] <= 17.044 entropy = 0.684 samples = 11 value = [0, 0, 9, 2] 98->99 104 entropy = 0.0 samples = 3 value = [0, 0, 0, 3] 98->104 100 Distance [m] (from fault) <= 3948.505 entropy = 0.918 samples = 3 value = [0, 0, 1, 2] 99->100 103 entropy = 0.0 samples = 8 value = [0, 0, 8, 0] 99->103 101 entropy = 0.0 samples = 1 value = [0, 0, 1, 0] 100->101 102 entropy = 0.0 samples = 2 value = [0, 0, 0, 2] 100->102 106 Slope [deg] (mean) <= 17.5 entropy = 0.722 samples = 15 value = [12, 0, 0, 3] 105->106 111 Relief mean [m] <= 1549.185 entropy = 1.883 samples = 16 value = [3, 5, 2, 6] 105->111 107 entropy = 0.0 samples = 10 value = [10, 0, 0, 0] 106->107 108 log_Area [m**2] <= 13.949 entropy = 0.971 samples = 5 value = [2, 0, 0, 3] 106->108 109 entropy = 0.0 samples = 3 value = [0, 0, 0, 3] 108->109 110 entropy = 0.0 samples = 2 value = [2, 0, 0, 0] 108->110 112 Distance [m] (from B-fault) <= 122741.699 entropy = 1.485 samples = 10 value = [0, 5, 2, 3] 111->112 119 Curvature mean <= -0.051 entropy = 1.0 samples = 6 value = [3, 0, 0, 3] 111->119 113 Distance [m] (from fold) <= 8220.025 entropy = 0.954 samples = 8 value = [0, 5, 0, 3] 112->113 118 entropy = 0.0 samples = 2 value = [0, 0, 2, 0] 112->118 114 Distance [m] (from river) <= 4508.735 entropy = 0.811 samples = 4 value = [0, 1, 0, 3] 113->114 117 entropy = 0.0 samples = 4 value = [0, 4, 0, 0] 113->117 115 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 114->115 116 entropy = 0.0 samples = 3 value = [0, 0, 0, 3] 114->116 120 entropy = 0.0 samples = 3 value = [3, 0, 0, 0] 119->120 121 entropy = 0.0 samples = 3 value = [0, 0, 0, 3] 119->121 123 Curvature mean <= -0.003 entropy = 1.139 samples = 61 value = [5, 4, 5, 47] 122->123 150 Distance [m] (from B-fault) <= 94989.352 entropy = 1.482 samples = 82 value = [0, 16, 25, 41] 122->150 124 Distance [m] (from drainage) <= 1344.18 entropy = 0.835 samples = 31 value = [5, 0, 1, 25] 123->124 137 Distance [m] (from river) <= 27358.704 entropy = 1.103 samples = 30 value = [0, 4, 4, 22] 123->137 125 Distance [m] (from drainage) <= 1308.3 entropy = 1.0 samples = 2 value = [1, 0, 1, 0] 124->125 128 Relief mean [m] <= 1394.59 entropy = 0.579 samples = 29 value = [4, 0, 0, 25] 124->128 126 entropy = 0.0 samples = 1 value = [0, 0, 1, 0] 125->126 127 entropy = 0.0 samples = 1 value = [1, 0, 0, 0] 125->127 129 Curvature mean <= -0.013 entropy = 0.242 samples = 25 value = [1, 0, 0, 24] 128->129 134 Slope [deg] (mean) <= 22.5 entropy = 0.811 samples = 4 value = [3, 0, 0, 1] 128->134 130 entropy = 0.0 samples = 22 value = [0, 0, 0, 22] 129->130 131 Slope [deg] (mean) <= 19.0 entropy = 0.918 samples = 3 value = [1, 0, 0, 2] 129->131 132 entropy = 0.0 samples = 2 value = [0, 0, 0, 2] 131->132 133 entropy = 0.0 samples = 1 value = [1, 0, 0, 0] 131->133 135 entropy = 0.0 samples = 3 value = [3, 0, 0, 0] 134->135 136 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 134->136 138 Relief mean [m] <= 988.715 entropy = 1.403 samples = 19 value = [0, 4, 4, 11] 137->138 149 entropy = 0.0 samples = 11 value = [0, 0, 0, 11] 137->149 139 Distance [m] (from fault) <= 5870.93 entropy = 1.406 samples = 8 value = [0, 3, 4, 1] 138->139 146 Slope [deg] (mean) <= 25.0 entropy = 0.439 samples = 11 value = [0, 1, 0, 10] 138->146 140 Distance [m] (from river) <= 26446.335 entropy = 0.722 samples = 5 value = [0, 1, 4, 0] 139->140 143 Distance [m] (from B-fault) <= 15843.565 entropy = 0.918 samples = 3 value = [0, 2, 0, 1] 139->143 141 entropy = 0.0 samples = 4 value = [0, 0, 4, 0] 140->141 142 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 140->142 144 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 143->144 145 entropy = 0.0 samples = 2 value = [0, 2, 0, 0] 143->145 147 entropy = 0.0 samples = 10 value = [0, 0, 0, 10] 146->147 148 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 146->148 151 Elev mean [m a.s.l.] <= 751.66 entropy = 1.521 samples = 72 value = [0, 15, 25, 32] 150->151 196 log_Vol [m**3] <= 21.431 entropy = 0.469 samples = 10 value = [0, 1, 0, 9] 150->196 152 Relief mean [m] <= 996.1 entropy = 1.0 samples = 14 value = [0, 0, 7, 7] 151->152 159 Elev mean [m a.s.l.] <= 1087.585 entropy = 1.552 samples = 58 value = [0, 15, 18, 25] 151->159 153 entropy = 0.0 samples = 5 value = [0, 0, 5, 0] 152->153 154 Distance [m] (from fold) <= 969.19 entropy = 0.764 samples = 9 value = [0, 0, 2, 7] 152->154 155 Curvature mean <= 0.02 entropy = 0.918 samples = 3 value = [0, 0, 2, 1] 154->155 158 entropy = 0.0 samples = 6 value = [0, 0, 0, 6] 154->158 156 entropy = 0.0 samples = 2 value = [0, 0, 2, 0] 155->156 157 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 155->157 160 Evaporite [%] <= 27.5 entropy = 0.881 samples = 10 value = [0, 7, 0, 3] 159->160 165 Distance [m] (from fault) <= 9684.325 entropy = 1.477 samples = 48 value = [0, 8, 18, 22] 159->165 161 Slope [deg] (mean) <= 13.5 entropy = 0.544 samples = 8 value = [0, 7, 0, 1] 160->161 164 entropy = 0.0 samples = 2 value = [0, 0, 0, 2] 160->164 162 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 161->162 163 entropy = 0.0 samples = 7 value = [0, 7, 0, 0] 161->163 166 Carb [%] <= 77.5 entropy = 1.468 samples = 43 value = [0, 8, 13, 22] 165->166 195 entropy = 0.0 samples = 5 value = [0, 0, 5, 0] 165->195 167 Slope [deg] (mean) <= 12.5 entropy = 1.333 samples = 17 value = [0, 2, 10, 5] 166->167 180 Elev mean [m a.s.l.] <= 1793.05 entropy = 1.248 samples = 26 value = [0, 6, 3, 17] 166->180 168 Curvature mean <= -0.078 entropy = 0.811 samples = 4 value = [0, 1, 0, 3] 167->168 171 Curvature mean <= 0.041 entropy = 0.991 samples = 13 value = [0, 1, 10, 2] 167->171 169 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 168->169 170 entropy = 0.0 samples = 3 value = [0, 0, 0, 3] 168->170 172 Distance [m] (from fault) <= 898.365 entropy = 0.439 samples = 11 value = [0, 0, 10, 1] 171->172 177 Distance [m] (from B-fault) <= 45350.22 entropy = 1.0 samples = 2 value = [0, 1, 0, 1] 171->177 173 log_Area [m**2] <= 14.842 entropy = 1.0 samples = 2 value = [0, 0, 1, 1] 172->173 176 entropy = 0.0 samples = 9 value = [0, 0, 9, 0] 172->176 174 entropy = 0.0 samples = 1 value = [0, 0, 1, 0] 173->174 175 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 173->175 178 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 177->178 179 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 177->179 181 Distance [m] (from B-fault) <= 47715.67 entropy = 1.53 samples = 9 value = [0, 2, 3, 4] 180->181 188 Distance [m] (from B-fault) <= 4500.43 entropy = 0.787 samples = 17 value = [0, 4, 0, 13] 180->188 182 Curvature mean <= 0.002 entropy = 0.985 samples = 7 value = [0, 0, 3, 4] 181->182 187 entropy = 0.0 samples = 2 value = [0, 2, 0, 0] 181->187 183 Curvature mean <= -0.145 entropy = 0.811 samples = 4 value = [0, 0, 3, 1] 182->183 186 entropy = 0.0 samples = 3 value = [0, 0, 0, 3] 182->186 184 entropy = 0.0 samples = 1 value = [0, 0, 0, 1] 183->184 185 entropy = 0.0 samples = 3 value = [0, 0, 3, 0] 183->185 189 entropy = 0.0 samples = 2 value = [0, 2, 0, 0] 188->189 190 Curvature mean <= -0.086 entropy = 0.567 samples = 15 value = [0, 2, 0, 13] 188->190 191 Distance [m] (from drainage) <= 1580.615 entropy = 1.0 samples = 4 value = [0, 2, 0, 2] 190->191 194 entropy = 0.0 samples = 11 value = [0, 0, 0, 11] 190->194 192 entropy = 0.0 samples = 2 value = [0, 2, 0, 0] 191->192 193 entropy = 0.0 samples = 2 value = [0, 0, 0, 2] 191->193 197 entropy = 0.0 samples = 9 value = [0, 0, 0, 9] 196->197 198 entropy = 0.0 samples = 1 value = [0, 1, 0, 0] 196->198
In [44]:
%matplotlib notebook
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split


X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)

dtree = DecisionTreeClassifier(random_state=0)

dtree.fit(X_train, y_train)
print("Accuracy on training set: {:.3f}".format(dtree.score(X_train, y_train)))
print("Accuracy on test set: {:.3f}".format(dtree.score(X_test, y_test)))
Accuracy on training set: 1.000
Accuracy on test set: 0.500
In [45]:
dtree = DecisionTreeClassifier(max_depth=4, random_state=0)
dtree.fit(X_train, y_train)

print("Accuracy on training set: {:.3f}".format(dtree.score(X_train, y_train)))
print("Accuracy on test set: {:.3f}".format(dtree.score(X_test, y_test)))
Accuracy on training set: 0.661
Accuracy on test set: 0.452

Scores are obtained for our Data.

creating the feature importance chart¶

In [46]:
import matplotlib.pyplot as plt
import numpy as np
In [47]:
%matplotlib inline

def plot_feature_importances_landslide(model):
    fig, ax = plt.subplots(figsize=(9, 7))
    n_features2 = X.shape[1]
    plt.barh(range(n_features2), model.feature_importances_, align='center')
    plt.yticks(np.arange(n_features2), features2 )
    plt.xlabel("Feature importance")
    plt.ylabel("Feature")
    plt.ylim(-1, n_features2)

plot_feature_importances_landslide(dtree)

Interpretation of Feature Importance Chart: 1: This chart tells us the score of each feature 2: The more the score of the feature, the more important it is in predicting the model data. 3: For example, in this feature chart, Distance[m] from drainage has the most score, which shows that it has the most importance in predicting the scores of this model. 4: Distance [m] from drainage also shows that other features of this dataset such as distance [m] from river are also dependent on it as compared to other features. 5: The other important feature of this dataset is Relief mean [m]. It is vital and of great importance because parameters like Slope [deg] also depends on feature like Relief. 6: Lastly, Elev mean and log_Area are also vital features as they are directly related to one another.

In [48]:
import os 
import graphviz

os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'

# Create DOT data
from sklearn.tree import export_graphviz

dot_data = export_graphviz(dtree, out_file=None, filled=True, rounded=True, feature_names=features2) 

# Draw graph
graph = graphviz.Source(dot_data) 

# Show graph
graph 

#DECISION TREE WITH GINI
Out[48]:
Tree 0 Distance [m] (from drainage) <= 1213.975 gini = 0.701 samples = 251 value = [30, 63, 52, 106] 1 Relief mean [m] <= 771.875 gini = 0.727 samples = 146 value = [26, 52, 26, 42] 0->1 True 16 log_Area [m**2] <= 12.559 gini = 0.555 samples = 105 value = [4, 11, 26, 64] 0->16 False 2 Distance [m] (from river) <= 26741.575 gini = 0.551 samples = 49 value = [6, 31, 4, 8] 1->2 9 Relief mean [m] <= 1391.51 gini = 0.736 samples = 97 value = [20, 21, 22, 34] 1->9 3 Distance [m] (from drainage) <= 925.88 gini = 0.444 samples = 40 value = [6, 29, 2, 3] 2->3 6 Distance [m] (from B-fault) <= 17337.54 gini = 0.593 samples = 9 value = [0, 2, 2, 5] 2->6 4 gini = 0.398 samples = 38 value = [4, 29, 2, 3] 3->4 5 gini = 0.0 samples = 2 value = [2, 0, 0, 0] 3->5 7 gini = 0.278 samples = 6 value = [0, 1, 0, 5] 6->7 8 gini = 0.444 samples = 3 value = [0, 1, 2, 0] 6->8 10 Distance [m] (from fault) <= 232.545 gini = 0.691 samples = 60 value = [4, 14, 18, 24] 9->10 13 Slope [deg] (mean) <= 18.5 gini = 0.692 samples = 37 value = [16, 7, 4, 10] 9->13 11 gini = 0.0 samples = 4 value = [0, 4, 0, 0] 10->11 12 gini = 0.676 samples = 56 value = [4, 10, 18, 24] 10->12 14 gini = 0.582 samples = 27 value = [16, 6, 2, 3] 13->14 15 gini = 0.46 samples = 10 value = [0, 1, 2, 7] 13->15 17 Distance [m] (from fold) <= 741.85 gini = 0.352 samples = 44 value = [3, 2, 4, 35] 16->17 24 Elev mean [m a.s.l.] <= 2382.14 gini = 0.622 samples = 61 value = [1, 9, 22, 29] 16->24 18 Curvature mean <= -0.002 gini = 0.722 samples = 6 value = [2, 2, 1, 1] 17->18 21 Distance [m] (from drainage) <= 1322.35 gini = 0.193 samples = 38 value = [1, 0, 3, 34] 17->21 19 gini = 0.444 samples = 3 value = [2, 0, 0, 1] 18->19 20 gini = 0.444 samples = 3 value = [0, 2, 1, 0] 18->20 22 gini = 0.0 samples = 1 value = [0, 0, 1, 0] 21->22 23 gini = 0.152 samples = 37 value = [1, 0, 2, 34] 21->23 25 Relief mean [m] <= 948.365 gini = 0.651 samples = 46 value = [1, 9, 20, 16] 24->25 28 Distance [m] (from drainage) <= 4571.64 gini = 0.231 samples = 15 value = [0, 0, 2, 13] 24->28 26 gini = 0.314 samples = 11 value = [0, 1, 9, 1] 25->26 27 gini = 0.664 samples = 35 value = [1, 8, 11, 15] 25->27 29 gini = 0.133 samples = 14 value = [0, 0, 1, 13] 28->29 30 gini = 0.0 samples = 1 value = [0, 0, 1, 0] 28->30

QUESTION 1: APPLY SVC ON DIFFERENT TYPES OF LANDSLIDES. OBTAIN SCORES.¶

In [49]:
%matplotlib inline

from mlxtend.plotting import plot_decision_regions
from sklearn.svm import LinearSVC
from sklearn.decomposition import PCA
In [50]:
ds6 = ds5.copy()
In [51]:
ds6
Out[51]:
Volume LCL [%] Volume UCL [%] Elev mean [m a.s.l.] Relief mean [m] Curvature mean Slope [deg] (mean) Carb [%] Clastics [%] (Fine clastic) Evaporite [%] Clastics [%] (Coarse clastic) Distance [m] (from fold) Distance [m] (from fault) Distance [m] (from B-fault) Distance [m] (from river) Distance [m] (from drainage) Slide (Slide type) log_Vol [m**3] log_Area [m**2] Area (Region)_Eastern Zagros (Fars area) Area (Region)_Western Zagros (Lorestan) Slide_depth Distance_triggers
0 10 20 1994.58 1523.04 0.078189 18 50 50 0 0 30954.22 1551.54 73652.48 62941.98 571.04 1 17.917866 14.110811 0.0 1.0 1.269797 138717.04
1 5 10 1130.53 1364.11 -0.056317 20 75 0 0 25 19.11 5857.57 3480.28 3627.51 378.25 1 16.669034 13.430690 0.0 1.0 1.241115 13343.61
2 5 10 916.95 726.22 -0.020998 10 100 0 0 0 3233.89 2222.71 4390.10 7047.74 694.33 1 13.782033 11.268941 0.0 1.0 1.223010 14354.88
3 5 5 917.87 677.34 0.002125 6 100 0 0 0 3420.80 2383.70 5117.53 8167.99 717.86 1 13.929437 12.059954 0.0 1.0 1.155016 16387.08
4 5 5 1421.61 963.62 -0.127624 17 75 0 0 25 155.50 10508.98 8585.29 13137.74 232.54 3 17.476793 13.807381 0.0 1.0 1.265757 32464.55
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
330 20 30 1275.40 1739.75 0.036876 22 50 0 0 50 215.40 1690.49 41372.82 30640.35 730.85 3 20.100909 14.795741 0.0 1.0 1.358560 74434.51
331 5 5 1342.33 1699.60 0.005915 30 50 0 0 50 176.96 786.23 42829.74 32095.16 716.12 3 18.020979 13.992778 0.0 1.0 1.287877 76427.25
332 5 5 1164.94 1840.45 0.041431 21 80 20 0 0 4253.19 5455.56 21117.85 3268.45 827.83 2 24.190909 18.459901 0.0 1.0 1.310457 30669.69
333 5 10 795.59 917.25 -0.002524 19 100 0 0 0 2138.81 5208.94 8856.31 125.67 368.91 3 15.971804 12.723422 0.0 1.0 1.255307 14559.83
334 5 5 2697.90 2478.82 -0.025608 19 60 40 0 0 1071.51 9310.01 7719.34 8390.22 3662.37 2 21.088770 16.211440 0.0 1.0 1.300857 29081.94

335 rows × 22 columns

In [75]:
X = ds6.drop('Slide (Slide type)', axis=1)
X = X.iloc[:,2:4].to_numpy()
y = ds6['Slide (Slide type)'].to_numpy()
clf = LinearSVC()
clf.fit(X,y)

fig, ax = plt.subplots(figsize = (12,12))
plot_decision_regions(X, y, clf)
plt.xlabel(y[7])
plt.ylabel(y[7])
Out[75]:
Text(0, 0.5, '2')

SCORES: IT SHOULD BE NOTED THAT I HAVE GOT SCORE IN THE FOLLOWING WAY FOR LINEAR SVC, WHERE I HAVE OBTAINED CONFUSION MATRIX AND COMPLETE CLASSIFICATION SCORE REPORT FOR EACH TYPE OF LANDSLIDE.¶

In [53]:
from sklearn.svm import LinearSVC
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score
from sklearn.metrics import confusion_matrix
from sklearn.metrics import classification_report
In [54]:
X = ds6.drop('Slide (Slide type)', axis=1)
y = ds6['Slide (Slide type)'].to_numpy()
In [55]:
X, y = make_classification(n_samples=5000, n_features=20,
                           n_classes=4,
                           n_clusters_per_class=1)
print(X[0:5])
print(y[0:5])
[[-0.39060675 -1.77932901 -0.17162283  0.58219608  1.04713176 -0.44574119
   1.06653976 -0.43235814  1.26863905 -0.85870508  0.55642621 -1.21061523
   1.01316588  0.19255722 -0.61079278  1.15581895 -0.77732881 -0.29881675
  -0.28845439  0.44366572]
 [ 0.73038839  0.11617222  1.39878238  0.15589286  0.26818716  0.96384049
  -0.92307767  0.8096328  -0.41929662 -1.41128437  0.93042495 -0.00880126
   0.75300675  0.10071776 -0.50425768 -0.3121313   0.3114455  -0.71410604
   0.78767557 -0.02445795]
 [-0.19289848 -0.35923217 -0.98645354  1.37267098  2.60639739  0.10484124
  -0.26913702 -0.24953885 -0.37863258  0.78224654  0.9542122   0.28301765
   0.07090144 -1.03728977  1.00487045  0.5674051   0.0708133  -1.47967854
   0.73631922 -0.13870199]
 [-0.39274147 -0.53106882  0.51701422 -0.65959494 -0.42013916  1.34001156
   2.66169036 -0.74977261 -1.75741389 -0.41609417  1.28184898  0.66910353
  -0.52730553 -0.35819098 -2.30529267  0.28476125  0.53971911 -0.49430148
  -2.48117664 -1.17312634]
 [-0.11808461 -0.56043468 -2.00442412 -0.35172237 -1.76422898  0.51613726
  -1.09093822 -0.31698624 -0.62299412  0.34765721 -1.22408775 -2.11250486
  -1.0049078  -1.00425645  2.42575352  0.16632115 -0.30116948  1.02745524
   0.37354688 -0.85397092]]
[2 0 3 3 0]
In [56]:
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25)
In [57]:
lsvc = LinearSVC(dual=False)
print(lsvc)
LinearSVC(dual=False)
In [58]:
lsvc.fit(X_train, y_train)
score = lsvc.score(X_train, y_train)
print("Score: ", score)
Score:  0.7904
In [59]:
cv_score = cross_val_score(lsvc, X_train, y_train, cv=10)
print("CV average score: ", cv_score.mean())
CV average score:  0.7853333333333333
In [60]:
ypred = lsvc.predict(X_test)
cm = confusion_matrix(y_test, ypred)
print(cm)
[[234  29  40   6]
 [ 47 272   1   5]
 [  1   2 246  60]
 [  7  33  31 236]]
In [61]:
cr = classification_report(y_test, ypred)
print(cr)
              precision    recall  f1-score   support

           0       0.81      0.76      0.78       309
           1       0.81      0.84      0.82       325
           2       0.77      0.80      0.78       309
           3       0.77      0.77      0.77       307

    accuracy                           0.79      1250
   macro avg       0.79      0.79      0.79      1250
weighted avg       0.79      0.79      0.79      1250

SVC with kernel trick¶

kernel = Poly

In [62]:
from sklearn.datasets import make_moons
from sklearn.svm import SVC
from mlxtend.plotting import plot_decision_regions
import matplotlib.gridspec as gridspec
import itertools
gs = gridspec.GridSpec(1, 2)
X = ds6.drop('Slide (Slide type)', axis=1)
X = X.iloc[:,2:4].to_numpy()
y = ds6['Slide (Slide type)'].to_numpy()

data = make_moons(n_samples= 100, noise = 0.3, random_state = 0)


clf1 = SVC(kernel = 'poly', degree = 3, C = 5, coef0=1)
clf1.fit(X,y)

clf2 = SVC(kernel = 'poly', degree = 3, C = 5, coef0=0)
clf2.fit(X,y)

fig = plt.figure(figsize=(16,8))

labels = ["kernel = 'poly', degree = 3, C = 5, coef0=1", "kernel = 'poly', degree = 3, C = 5, coef0=0"]
for clf, lab, grd in zip([clf1, clf2],
                         labels,
                         itertools.product([0, 1], repeat=2)):

    clf.fit(X, y)
    ax = plt.subplot(gs[grd[0], grd[1]])
    fig = plot_decision_regions(X=X, y=y, clf=clf, legend=2, zoom_factor=5)
    plt.title(lab)

SVC model with kernel thrick vs. LinearSVC¶

In [63]:
%matplotlib inline

from mlxtend.plotting import plot_decision_regions
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC, LinearSVC
import matplotlib.gridspec as gridspec
import itertools

X = ds6.drop('Slide (Slide type)', axis=1)
X = X.iloc[:,2:4].to_numpy()
y = ds6['Slide (Slide type)'].to_numpy()

X_train, X_test, y_train, y_test = train_test_split(X, y, random_state = 0)

C = 1
clf1 = LinearSVC(C=C)
clf2 = SVC(kernel='linear', C=C)
clf3 = SVC(kernel='rbf', gamma=0.7, C=C)
clf4 = SVC(kernel='poly', degree=3, C=C)


gs = gridspec.GridSpec(2, 2)
fig, ax = plt.subplots(figsize=(20, 15))

labels = ['LinearSVC',
          'SVC with linear kernel',
          'SVC with RBF kernel',
          'SVC with polynomial (degree 3) kernel']

for clf, lab, grd in zip([clf1, clf2, clf3, clf4],
                         labels,
                         itertools.product([0, 1],
                         repeat=2)):
    clf.fit(X, y)
    ax = plt.subplot(gs[grd[0], grd[1]])
    fig = plot_decision_regions(X=X, y=y,
                                clf=clf, legend=2)
    plt.title(lab)
    handles, labels = ax.get_legend_handles_labels()
In [64]:
%matplotlib inline

from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC, LinearSVC

X = ds6.drop('Slide (Slide type)', axis=1)
X = X.iloc[:,2:4].to_numpy()
y = ds6['Slide (Slide type)'].to_numpy()

X_train, X_test, y_train, y_test = train_test_split(X, y, random_state = 0)


C = 1
clf1 = SVC(kernel='rbf', gamma=0.01, C=C)
clf2 = SVC(kernel='rbf', gamma=0.1, C=C)
clf3 = SVC(kernel='rbf', gamma=1, C=C)
clf4 = SVC(kernel='rbf', gamma=10, C=C)


models = (SVC(kernel='rbf', gamma=0.01, C=1),
         SVC(kernel = 'rbf', gamma = 0.1, C = 1),
         SVC(kernel = 'rbf', gamma = 1, C = 1),
         SVC(kernel = 'rbf', gamma = 10, C = 1))


gs = gridspec.GridSpec(2, 2)
fig, ax = plt.subplots(figsize=(20, 15))

labels = ['gamma = 0.01',
          'gamma = 0.1',
          'gamma = 1',
          'gamma = 10']

for clf, lab, grd in zip([clf1, clf2, clf3, clf4],
                         labels,
                         itertools.product([0, 1],
                         repeat=2)):
    clf.fit(X, y)
    ax = plt.subplot(gs[grd[0], grd[1]])
    fig = plot_decision_regions(X=X, y=y,
                                clf=clf, legend=2)
    plt.title(lab)
    handles, labels = ax.get_legend_handles_labels()
In [65]:
%matplotlib inline

from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC, LinearSVC

X = ds6.drop('Slide (Slide type)', axis=1)
X = X.iloc[:,2:4].to_numpy()
y = ds6['Slide (Slide type)'].to_numpy()

X_train, X_test, y_train, y_test = train_test_split(X, y, random_state = 0)


gamma = 0.7
clf1 = SVC(kernel='rbf', gamma=gamma, C=0.01)
clf2 = SVC(kernel='rbf', gamma=gamma, C=1)
clf3 = SVC(kernel='rbf', gamma=gamma, C=10)
clf4 = SVC(kernel='rbf', gamma=gamma, C=1000)

gs = gridspec.GridSpec(2, 2)
fig = plt.figure(figsize=(20, 15))

labels = ['C = 0.01',
          'C = 1',
          'C = 10',
          'C = 1000']

for clf, lab, grd in zip([clf1, clf2, clf3, clf4],
                         labels,
                         itertools.product([0, 1],
                         repeat=2)):
    clf.fit(X, y)
    ax = plt.subplot(gs[grd[0], grd[1]])
    fig = plot_decision_regions(X=X, y=y,
                                clf=clf, legend=2)
    plt.title(lab)
    handles, labels = ax.get_legend_handles_labels()
In [ ]: